import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'
import actions from "@/store/actions";


//第一个参数为模块名，第二参数为actions方法
export default (mode,action=actions)=>{
    return connect(
        state=>state[mode],
        dispatch=>bindActionCreators(action,dispatch)
    )
}
